package com.qf.service.Impl;/*
    Dell
    2021/10/9
    12:03
*/

import com.qf.dao.CategoryDao;
import com.qf.dao.Impl.CategoryDaoImpl;
import com.qf.entiy.Category;
import com.qf.entiy.Product;
import com.qf.service.CategoryService;
import com.qf.util.DruidUtil;

import java.util.List;

public class CategoryServiceImpl implements CategoryService {
    private CategoryDao categoryDao = new CategoryDaoImpl();
    @Override
    public List<Category> showAll() {
        List<Category> categoryList = null;
        categoryList = categoryDao.showAll();
        DruidUtil.close();
        return categoryList;
    }

    @Override
    public Product showById(Integer id) {
        Product product = null;
        product = categoryDao.showById(id);
        DruidUtil.close();
        return product;
    }
}
